﻿using System;
using System.Windows.Data;

namespace JY.Wpf.Core.Converters
{
    /// <summary>
    /// bool转换是否转换器
    /// </summary>
    public class BooleanToYesNoConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string result = "否";
            
            if (value!=null&&(bool)value)
            {
                result= "是";
            }
            return result;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
